/*
 * Filename:    DrugStoreIntgrityController.java
 * Copyright:   2015 中国平安保险（集团）股份有限公司 版权所有
 * Company:     平安科技养老险及健康险系统开发部
 * Create at:   2015-2-12
 */
package com.paic.mhis.hcpms.evaluation.evaluationDrugStore.drugStoreIllegal.web.controller;

import java.io.File;
import java.io.FileInputStream;
import java.io.OutputStream;
import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.paic.mhis.hcpms.evaluation.evaluationDrugStore.drugStoreIllegal.biz.service.DrugStoreIllegalService;
import com.paic.pafa.appclient.annotation.BizServicesProxy;

@Controller
@RequestMapping("/drugStoreIllegal/")
public class DrugStoreIllegalController {

	@BizServicesProxy
	private DrugStoreIllegalService drugStoreIllegalService;

	/**
	 * 药店违规情况,包括稽核，预警
	 */
	@RequestMapping("queryDrugStoreIllegal.do")
	@ResponseBody
	public Map<String, Object> queryDrugStoreIllegal(HttpServletRequest request) {
		Map<String, Object> result = new HashMap<String, Object>();
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("startDate", request.getParameter("startDate"));
		map.put("endDate", request.getParameter("endDate"));
		map.put("orgCode", request.getParameter("orgCode"));
		result=drugStoreIllegalService.drugStoreIllegal(map);
		return result;
	}
	
	/**
	 * 药店违规情况导出
	 */
	@RequestMapping("exportDrugStoreIllegal.do")
	@ResponseBody
	public void exportDrugStoreIllegal(HttpServletRequest request,HttpServletResponse response) {
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("orgCode", request.getParameter("orgCode"));
		map.put("startDate",request.getParameter("startDate"));
		map.put("endDate",request.getParameter("endDate"));
		map.put("orgName", request.getParameter("orgName"));
		drugStoreIllegalService.exportDrugStoreIllegal(request,response,map);
	}
	/**
	 * 药店预警详情
	 */
	@RequestMapping("drugStoreIllegalWarnDetails.do")
	@ResponseBody
	public Map<String, Object> drugStoreIllegalWarnDetails(HttpServletRequest request) {
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("orgCode", request.getParameter("orgCode"));
		map.put("process", request.getParameter("code"));
		map.put("startDate",request.getParameter("startDate"));
		map.put("endDate",request.getParameter("endDate"));
		return drugStoreIllegalService.drugStoreIllegalWarnDetails(map);
	}
	
	/**
	 *药店稽核详情 
	 */
	@RequestMapping("drugStoreIllegalAuditDetails.do")
	@ResponseBody
	public Map<String, Object> drugStoreIllegalAuditDetails(HttpServletRequest request) {
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("orgCode", request.getParameter("orgCode"));
		map.put("startDate",request.getParameter("startDate"));
		map.put("endDate",request.getParameter("endDate"));
		return drugStoreIllegalService.drugStoreIllegalAuditDetails(map);
	}
}
